// 反转字符串

/**
 * @param {character[]} s
 * @return {void} Do not return anything, modify s in-place instead.
 */
 var reverseString = function(s) {
    // return s.reverse()
    // let left = -1;
    // let right = s.length
    // while (++left < --right) {
        
    //     [s[left],s[right]] = [s[right],s[left]]
        
    // }
    // return s
    let len = s.length;
    for (let i = 0; i<len/2; i++) {
        let temp = s[i]
        s[i] = s[len-1-i]
        s[len-1-i] = temp
    }
    return s
};